package com.csnf.order.interceptor;

import feign.RequestInterceptor;
import feign.RequestTemplate;
import org.springframework.stereotype.Component;

import java.util.UUID;

@Component
public class TokenRequestInterceptor implements RequestInterceptor {

    //编写拦截器实现的业务代码
    @Override
    public void apply(RequestTemplate requestTemplate) {

        requestTemplate.header("token", UUID.randomUUID().toString());

    }


}
